<div id="content-container" class="container" style="margin-top: 50px;">
    <style>
        .list_one{
            padding: 10px;
            border-bottom: 1px dashed #e3e3e3;
            margin-bottom: 18px;
            position: relative;
            display: flex;
            justify-content: space-between;
        }
        .list_one .title {
            font-weight: bold;
            color: #fff;
            font-size: 18px;
        }
        .tool_tips{
            display: none;
            width: 320px;
            background-color: #ffffff;
            color: #000000;
            border-radius: 5px;
            padding: 19px 23px;
            position: absolute;
            z-index: 99999;
            bottom: 110%;
            left: 20%;
            margin-left: -60px;
        }
        .tool_tips::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 30%;
            margin-left: -5px;
            border-width: 5px;
            border-style: solid;
            border-color: #ffffff transparent transparent transparent;
        }
        .show_btn{
            background: #7a7a7a;
            color: #fff;
            padding: 3px 16px;
            margin-bottom: 8px;
            border-radius: 18px;
            cursor: pointer;
        }
        .show_btn a{
            color: #fff;
        }

        .show_btn2{
            background: #3e3d3d;
            color: #fff;
            padding: 3px 16px;
            margin-bottom: 8px;
            border-radius: 18px;
            cursor: pointer;
        }
        .show_btn2 a{
            color: #fff;
        }

        .bianhao{
            display: flex;
            align-items: center;
            font-size: 16px;
        }
        .bianhao .status{
            margin-left: 16px;
            padding: 2px 12px;
            background-color: #444c69;
            color: #fff;
            border-radius: 12px;
            font-size: 12px;
        }
        .bianhao .status2 {
            margin-left: 16px;
            padding: 2px 12px;
            background-color: #646464;
            color: #fff;
            border-radius: 12px;
            font-size: 12px;
        }
        main.content{
            overflow: visible !important;
        }
    </style>
    <div class="row">
        <div class="col-md-3">
            {include file="common/sidenav" /}
        </div>
        <div class="col-md-9">
            <div class="panel panel-default">
                <div class="panel-body">
                    <h2 class="page-header">{:__('Wallet')}</h2>

                    <div class="row user-baseinfo">
                        <div class="col-xs-12 col-md-12">
                            {volist name='packageData' id='pack'}
                            <div class="list_one">
                                <div class="left">
                                    <div class="bianhao">
                                        <div>{$pack.order_num}</div>
                                        {if $pack.status eq 2}
                                        <div class="status">{:__('yizhifu')}</div>
                                        {/if}
                                        {if $pack.status eq 3}
                                        <div class="status2">{:__('yituikuan')}</div>
                                        {/if}
                                    </div>
                                    <div class="title">{$pack.package_name} - HK$ {$pack.price}</div>
                                    {if $pack.type == 1}
                                    <div style="color: #7a7a7a">{:__('shengyu_tip1',[$pack['left_time_num']])}，{:__('shengyu_tip2',[$pack['can_time_num']])} / {$pack.begin_time} ~ {$pack.end_time}</div>
                                    {else/}
                                    <div style="color: #7a7a7a">{$wuxianzhi} / {$pack.begin_time} ~ {$pack.end_time}</div>
                                    {/if}
                                    <div class="tool_tips">
                                        {volist name="pack.subject_name" id="row"}
                                        <div>{$row}</div>
                                        {/volist}
                                    </div>
                                </div>
                                {if $pack.is_finish == -1}
                                <div class="right">
                                    <div class="show_btn show_taocan" onclick="showSubject('{$pack.subject_name_json|htmlentities}')">{:__('package_detail')}</div>
                                    <div class="show_btn"><a href="/index/index/schedule.html">{:__('yuyue_ke')}</a></div>
                                </div>
                                {else/}
                                <div class="right">
                                    <div class="show_btn2 show_taocan" onclick="showSubject('{$pack.subject_name_json|htmlentities}')">{:__('package_detail')}</div>
                                    <div class="show_btn2"><a href="/index/index/schedule.html">{:__('Has Used')}</a></div>
                                </div>
                                {/if}

                            </div>
                            {/volist}

                            {empty name="packageData"}
                            <div>{:__('No Record')}</div>
                            {/empty}
                        </div>

                    </div>
                    <script>
                       /* $(".show_taocan").mousemove(function (){
                            $('.tool_tips').hide()
                            $(this).closest('.list_one').find('.tool_tips').show();
                        })
                        $(".show_taocan").mouseout(function (){
                            $(this).closest('.list_one').find('.tool_tips').hide();
                        })*/
                        function showSubject(row) {
                            var rowData = JSON.parse(row);
                            console.log(rowData);
                            var kechen = "{:__('Class Name')}";
                            var fenlei = "{:__('fenlei')}";
                            var shichang = "{:__('shichang')}";
                            var fen = "{:__('fen')}";
                            var content = "<div style='padding: 20px 36px;color: #0b0b0b'>";
                            content = content +"<table style='width: 100%;line-height: 30px'>" +
                                "    <thead>" +
                                "        <tr> " +
                                "            <th>"+fenlei+"</th>" +
                                "            <th>"+kechen+"</th>" +
                                "            <th>"+shichang+"</th> " +
                                "        </tr> " +
                                "    </thead>" +
                                "    <tbody>  "
                            for(var i=0;i<rowData.length;i++){
                                var tmpData = rowData[i];
                                content = content + " <tr>" +
                                    "            <td>"+tmpData.cate_name+"</td>" +
                                    "            <td>"+tmpData.name+"</td>" +
                                    "            <td>"+tmpData.long_time+fen+"</td>" +
                                    "        </tr>  ";
                            }

                            content = content + "</tbody>" +
                                "</table> ";
                            content = content + "</div>";
                            layer.open({
                                type: 1,
                                title: "{:__('Class Name')}",
                                content: content,
                                area: ['500px', '450px'],
                                offset: 'auto',
                                btn: ["{:__('Yes')}", "{:__('Cancel')}"],
                                closeBtn: 1,
                                shade: 0.3,
                                shadeClose: false,
                                time: 0,
                                maxmin: false,
                                fixed: true,
                                resize: true,
                                zIndex: 1989,
                                success: function(layero, index){

                                },
                                yes: function (index, layero) {
                                    layer.close(index); //关闭确认框
                                },
                                btn2: function (index, layero) {
                                    layer.close(index);
                                },
                                cancel: function(index, layero){
                                    layer.close(index);
                                    return false;
                                },
                                end: function(){
                                },
                                full: function(layero){
                                },
                                min: function(layero){
                                },
                                restore: function(layero){
                                },
                            });


                        }
                    </script>
                </div>
            </div>
        </div>
    </div>
</div>
